import Vue from 'vue'
import VueRouter from 'vue-router'
import MyIndex from '../views/MyIndex.vue'
import TeacherList from "../views/Index/TeacherList.vue";
import SchoolList from "../views/Index/SchoolList.vue";
Vue.use(VueRouter)

export let routes = [
  {
    path: '/index',
    name: 'index',
    component: MyIndex,
    label: "首页",
    redirect: '/index/teacherlist',
    children: [
      {
      path: 'teacherlist',
      name: 'teacherlist',
      label: "教师管理/教师列表",
      component: TeacherList,
    },
      {
      path: 'schoollist',
      name: 'schoollist',
      label: "院系管理/院系列表",
      component: SchoolList,
    },
  ]
  }
]



const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
